<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Module: TableData
  
    &mdash; Documentation by YARD 0.8.7.3
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '';
  framesUrl = "frames.html#!" + escape(window.location.href);
</script>


  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (T)</a> &raquo;
    
    
    <span class="title">TableData</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Module: TableData
  
  
  
</h1>

<dl class="box">
  
  
    
  
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">lib/tabledata.rb<span class="defines">,<br />
  lib/tabledata/row.rb,<br /> lib/tabledata/table.rb,<br /> lib/tabledata/parser.rb,<br /> lib/tabledata/tables.rb,<br /> lib/tabledata/column.rb,<br /> lib/tabledata/version.rb,<br /> lib/tabledata/coercion.rb,<br /> lib/tabledata/presenter.rb,<br /> lib/tabledata/detection.rb,<br /> lib/tabledata/exceptions.rb,<br /> lib/tabledata/coercing_row.rb,<br /> lib/tabledata/presenters/pdf.rb,<br /> lib/tabledata/presenters/csv.rb,<br /> lib/tabledata/presenters/html.rb,<br /> lib/tabledata/presenters/excel.rb</span>
</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>Handle tabular data</p>

<p>TableData supports the following file formats: * .xls Excel files (:xls) *
.xlsx Excel files (:xlsx) * .csv Comma Separated Values (:csv)</p>


  </div>
</div>
<div class="tags">
  

</div><h2>Defined Under Namespace</h2>
<p class="children">
  
    
      <strong class="modules">Modules:</strong> <span class='object_link'><a href="TableData/Coercion.html" title="TableData::Coercion (module)">Coercion</a></span>, <span class='object_link'><a href="TableData/Detection.html" title="TableData::Detection (module)">Detection</a></span>, <span class='object_link'><a href="TableData/Exception.html" title="TableData::Exception (module)">Exception</a></span>, <span class='object_link'><a href="TableData/Parser.html" title="TableData::Parser (module)">Parser</a></span>, <span class='object_link'><a href="TableData/Presenters.html" title="TableData::Presenters (module)">Presenters</a></span>
    
  
    
      <strong class="classes">Classes:</strong> <span class='object_link'><a href="TableData/CoercingRow.html" title="TableData::CoercingRow (class)">CoercingRow</a></span>, <span class='object_link'><a href="TableData/Column.html" title="TableData::Column (class)">Column</a></span>, <span class='object_link'><a href="TableData/InvalidColumnAccessor.html" title="TableData::InvalidColumnAccessor (class)">InvalidColumnAccessor</a></span>, <span class='object_link'><a href="TableData/InvalidColumnCount.html" title="TableData::InvalidColumnCount (class)">InvalidColumnCount</a></span>, <span class='object_link'><a href="TableData/InvalidColumnName.html" title="TableData::InvalidColumnName (class)">InvalidColumnName</a></span>, <span class='object_link'><a href="TableData/InvalidColumnSpecifier.html" title="TableData::InvalidColumnSpecifier (class)">InvalidColumnSpecifier</a></span>, <span class='object_link'><a href="TableData/InvalidFileType.html" title="TableData::InvalidFileType (class)">InvalidFileType</a></span>, <span class='object_link'><a href="TableData/LibraryMissingError.html" title="TableData::LibraryMissingError (class)">LibraryMissingError</a></span>, <span class='object_link'><a href="TableData/Presenter.html" title="TableData::Presenter (class)">Presenter</a></span>, <span class='object_link'><a href="TableData/Row.html" title="TableData::Row (class)">Row</a></span>, <span class='object_link'><a href="TableData/Table.html" title="TableData::Table (class)">Table</a></span>, <span class='object_link'><a href="TableData/Tables.html" title="TableData::Tables (class)">Tables</a></span>
    
  
</p>

  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="Version-constant" class="">Version =
          
        </dt>
        <dd><pre class="code"><span class='const'>Gem</span><span class='op'>::</span><span class='const'>Version</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.3</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span></pre></dd>
      
    </dl>
  







  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#require_library-class_method" title="require_library (class method)">+ (Object) <strong>require_library</strong>(name, message) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>A helper method to require optional dependencies and provide better
informing errors if such a dependency should be missing.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#table_from_data-class_method" title="table_from_data (class method)">+ (TableData::Table) <strong>table_from_data</strong>(*args) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#table_from_file-class_method" title="table_from_file (class method)">+ (TableData::Table) <strong>table_from_file</strong>(*args) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#tables_from_data-class_method" title="tables_from_data (class method)">+ (TableData::Tables) <strong>tables_from_data</strong>(*args) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#tables_from_file-class_method" title="tables_from_file (class method)">+ (TableData::Tables) <strong>tables_from_file</strong>(*args) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  



  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="require_library-class_method">
  
    + (<tt>Object</tt>) <strong>require_library</strong>(name, message) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>A helper method to require optional dependencies and provide better
informing errors if such a dependency should be missing. Also silences
$stdout during the require.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


49
50
51
52
53
54
55
56
57
58
59
60</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata.rb', line 49</span>

<span class='kw'>def</span> <span class='id identifier rubyid_require_library'>require_library</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
  <span class='gvar'>$stdout</span><span class='comma'>,</span> <span class='id identifier rubyid_oldstdout'>oldstdout</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='gvar'>$stdout</span>
  <span class='id identifier rubyid_require'>require</span> <span class='id identifier rubyid_name'>name</span>
<span class='kw'>rescue</span> <span class='const'>LoadError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_error'>error</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>cannot load such file -- </span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='regexp_end'>/</span></span> <span class='kw'>then</span>
    <span class='id identifier rubyid_raise'>raise</span> <span class='const'>LibraryMissingError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_raise'>raise</span>
  <span class='kw'>end</span>
<span class='kw'>ensure</span>
  <span class='gvar'>$stdout</span> <span class='op'>=</span> <span class='id identifier rubyid_oldstdout'>oldstdout</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="table_from_data-class_method">
  
    + (<tt><span class='object_link'><a href="TableData/Table.html" title="TableData::Table (class)">TableData::Table</a></span></tt>) <strong>table_from_data</strong>(*args) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="TableData/Table.html" title="TableData::Table (class)">TableData::Table</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li><span class='object_link'><a href="TableData/Table.html#from_data-class_method" title="TableData::Table.from_data (method)">Full documentation</a></span></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


28
29
30</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata.rb', line 28</span>

<span class='kw'>def</span> <span class='id identifier rubyid_table_from_data'>table_from_data</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='const'>Table</span><span class='period'>.</span><span class='id identifier rubyid_from_data'>from_data</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="table_from_file-class_method">
  
    + (<tt><span class='object_link'><a href="TableData/Table.html" title="TableData::Table (class)">TableData::Table</a></span></tt>) <strong>table_from_file</strong>(*args) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="TableData/Table.html" title="TableData::Table (class)">TableData::Table</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li><span class='object_link'><a href="TableData/Table.html#from_file-class_method" title="TableData::Table.from_file (method)">Full documentation</a></span></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


21
22
23</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata.rb', line 21</span>

<span class='kw'>def</span> <span class='id identifier rubyid_table_from_file'>table_from_file</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='const'>Table</span><span class='period'>.</span><span class='id identifier rubyid_from_file'>from_file</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="tables_from_data-class_method">
  
    + (<tt><span class='object_link'><a href="TableData/Tables.html" title="TableData::Tables (class)">TableData::Tables</a></span></tt>) <strong>tables_from_data</strong>(*args) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="TableData/Tables.html" title="TableData::Tables (class)">TableData::Tables</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li><span class='object_link'><a href="TableData/Tables.html#from_data-class_method" title="TableData::Tables.from_data (method)">Full documentation</a></span></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


42
43
44</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata.rb', line 42</span>

<span class='kw'>def</span> <span class='id identifier rubyid_tables_from_data'>tables_from_data</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='const'>Tables</span><span class='period'>.</span><span class='id identifier rubyid_from_data'>from_data</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="tables_from_file-class_method">
  
    + (<tt><span class='object_link'><a href="TableData/Tables.html" title="TableData::Tables (class)">TableData::Tables</a></span></tt>) <strong>tables_from_file</strong>(*args) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="TableData/Tables.html" title="TableData::Tables (class)">TableData::Tables</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

  <p class="tag_title">See Also:</p>
  <ul class="see">
    
      <li><span class='object_link'><a href="TableData/Tables.html#from_file-class_method" title="TableData::Tables.from_file (method)">Full documentation</a></span></li>
    
  </ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


35
36
37</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata.rb', line 35</span>

<span class='kw'>def</span> <span class='id identifier rubyid_tables_from_file'>tables_from_file</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
  <span class='const'>Tables</span><span class='period'>.</span><span class='id identifier rubyid_from_file'>from_file</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Sun Feb 23 13:33:18 2014 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.3 (ruby-2.1.0).
</div>

  </body>
</html>